Public Class Form1
    Private Sub Form1_MouseEnter(sender As Object, e As EventArgs) Handles Me.MouseEnter
        StatusBar1.Text = "Mouse entered"
    End Sub

    Private Sub Form1_MouseLeave(sender As Object, e As EventArgs) Handles Me.MouseLeave
        StatusBar1.Text = "Mouse left"
    End Sub
End Class
